package baby.myroute.server.model;

import java.io.Serializable;

public class UserLocationModel implements Serializable{

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		long temp;
		temp = Double.doubleToLongBits(lati);
		result = prime * result + (int) (temp ^ (temp >>> 32));
		temp = Double.doubleToLongBits(longti);
		result = prime * result + (int) (temp ^ (temp >>> 32));
		result = prime * result + (int) (time ^ (time >>> 32));
		result = prime * result + ((uid == null) ? 0 : uid.hashCode());
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		UserLocationModel other = (UserLocationModel) obj;
		if (Double.doubleToLongBits(lati) != Double
				.doubleToLongBits(other.lati))
			return false;
		if (Double.doubleToLongBits(longti) != Double
				.doubleToLongBits(other.longti))
			return false;
		if (time != other.time)
			return false;
		if (uid == null) {
			if (other.uid != null)
				return false;
		} else if (!uid.equals(other.uid))
			return false;
		return true;
	}
	@Override
	public String toString() {
		return "UserLocationModel [uid=" + uid + ", lati=" + lati + ", longti="
				+ longti + ", time=" + time + "]";
	}
	private String uid;
	private double lati;
	private double longti;
	private long time;
	
	public UserLocationModel()
	{
		
	}
	public UserLocationModel(String uid,double lati,double longti,long time)
	{
		this.uid=uid;
		this.lati=lati;
		this.longti=longti;
		this.time=time;
	}
	
	public String getUid() {
		return uid;
	}
	public void setUid(String uid) {
		this.uid = uid;
	}
	public double getLati() {
		return lati;
	}
	public void setLati(double lati) {
		this.lati = lati;
	}
	public double getLongti() {
		return longti;
	}
	public void setLongti(double longti) {
		this.longti = longti;
	}
	public long getTime() {
		return time;
	}
	public void setTime(long time) {
		this.time = time;
	}
}
